// 定义主题色变量
:root {
  --main-color: inherit;
}

// 初始化隐藏
.container-fluid {
  opacity: 0;
}

// 固定导航栏
.container-header {
  position: sticky;
  top: 0;
  z-index: 999;
}

// 页头设置
.component-header {
  .header-top {
    background: var(--main-color);
    color: #fff;
    font-size: .875rem;
    line-height: 1.25rem;
    padding: .5rem 0;
  }

  .header-nav {
    background: #fff;
    padding: .75rem 0;

    .nav-logo {
      text-align: center;
      text-decoration: none;
      margin-right: 1rem;

      img {
        width: auto;
        height: 3rem;
        margin-right: .75rem;
      }

      .title {
        color: #333;
        font-size: 1rem;
        font-weight: 600;
        line-height: 1.5rem;
        margin-bottom: 0;
      }
    }

    .nav-box {
      margin-bottom: 0;

      .nav-item {
        a {
          display: inline-block;
          padding: 0.5rem 1rem;
          color: #333;
          transition: color .3s;
          text-decoration: none;
        }

        &.active a {
          color: var(--main-color);
        }

        &:hover a {
          color: var(--main-color);
        }
      }
    }

    .nav-mobile {
      display: none;

      button {
        background: transparent;
        border: none;
        transition: all .3s;

        .icon-bar {
          margin: auto;
          display: block;
          width: 1.625rem;
          height: .1875rem;
          border-radius: .125rem;
          background: var(--main-color);
          margin-top: .375rem;

          &:first-child {
            margin-top: 0;
          }
        }
      }

      .nav-list {
        position: relative;
        display: none;

        ul {
          position: absolute;
          top: .5rem;
          right: 0;
          background: #fff;
          width: 10rem;
          box-shadow: 0 .375rem .75rem rgba(0, 0, 0, 0.18);
          border-radius: .3125rem .3125rem 0 0;
          margin: 0;

          li {
            text-align: center;

            a {
              text-decoration: none;
              background: #fff;
              font-size: .875rem;
              color: #000;
              transition: color 0.3s;
              display: block;
              padding: .625rem .9375rem;
            }

            &.active a {
              color: var(--main-color);
            }
          }
        }
      }
    }
  }
}

// 页脚设置
.component-footer {
  background: #333;
  text-align: center;
  padding-top: 6.5rem;
  padding-bottom: 6.5rem;

  .footer-logo {
    margin-bottom: 2.2rem;

    img {
      width: auto;
      height: 3rem;
      margin-right: .75rem;
      background: #fff;
      border-radius: 50%;
    }

    .title {
      color: #fff;
      font-size: 1.25rem;
      font-weight: 600;
      line-height: 1.5rem;
    }
  }

  .footer-info {
    span {
      color: #fff;
      font-size: .875rem;
      line-height: 2rem;
      margin: 0 .5rem;

      b {
        font-weight: normal;
      }
    }
  }
}

// 广告图设置
.container-carousel {
  height: 20vw;
  margin: 0 -15px;

  .carousel-inner,
  .carousel-item {
    height: 100%;
  }

  .carousel-indicators {
    li {
      width: .75rem;
      height: .75rem;
      background: #fff;
      border-radius: 50%;
      margin: 0 .375rem;
      box-sizing: border-box;
      opacity: 1;
      border: none;

      &.active {
        background: var(--main-color);
      }
    }
  }
}

// 版本名称
.versionName {
  font-style: normal;
}

// 列表为空
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 0 1rem;
  display: none;

  img {
    width: 50vw;
    max-width: 18.75rem;
    height: auto;
  }

  span {
    color: #999;
    font-size: 1rem;
    line-height: 1.25rem;
  }
}

// 轮播图设置
#carouselExampleIndicators .carousel-inner .carousel-item {
  .normal {
    display: block !important;
  }

  .mobile {
    display: none !important;

  }
}

// 分页设置
#page {
  margin: 0 auto;
  display: block;
  display: flex;
  align-items: center;
  justify-content: center;

  .xl-totalPage {
    color: #000;
    font-size: 1rem;
    line-height: 1.5rem;
    margin-right: .75rem;
  }

  ul {
    margin: 0;

    li {
      text-align: center;
      display: inline-block;
      color: var(--main-color);
      font-size: .875rem;
      line-height: 1.25rem;
      padding: .25rem .375rem;
      min-width: 1.875rem;
      border: 1px solid var(--main-color);
      border-radius: .25rem;
      margin: 0 .1875rem;
      cursor: pointer;
      transition: all .3s;

      &.xl-active,
      &:hover {
        color: #fff;
        background: var(--main-color);
      }

      &.xl-disabled {
        color: #DDDDDD;
        border: 1px solid #DDDDDD;
        background: #fff;
        cursor: no-drop;
      }
    }
  }
}

// 适配手机端
@media screen and (max-width: 767px) {
  .col-2 {
    max-width: 0;
    flex: 0;
  }

  .col-8 {
    max-width: 100%;
    flex: 0 0 100%;
  }

  // 页头设置
  .component-header {
    .header-nav {
      padding: 0.5rem 0;

      .nav-logo {
        img {
          width: auto;
          height: 2.25rem;
          margin-right: .5rem;
        }

        .title {
          color: #333;
          font-size: .875rem;
          font-weight: 600;
          line-height: 1.25rem;
        }
      }

      .nav-normal {
        display: none;
      }

      .nav-mobile {
        display: block;
      }
    }
  }

  // 页脚设置
  .component-footer {
    padding: 2rem 0;

    .footer-logo {
      margin-bottom: 1rem;

      img {
        width: auto;
        height: 2.5rem;
        margin-right: .5rem;
      }

      .title {
        font-size: 1rem;
        font-weight: 600;
        line-height: 1.375rem;
      }
    }
  }

  // 广告图设置
  .container-carousel {
    height: 50vw !important;
  }

  // 轮播图设置
  #carouselExampleIndicators .carousel-inner .carousel-item{
    .normal {
      display: none !important;
    }

    .mobile {
      display: block !important;

    }
  }

  // 分页设置
  #page {
    .xl-totalPage {
      font-size: .75rem;
    }

    ul li {
      padding: 0.25rem .375rem;
      font-size: .75rem;
    }
  }
}